package com.orhon.smartcampus.modules.systemctl.mm;


import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.DictionaryMapper;
import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.systemctl.entity.Apis;
import com.orhon.smartcampus.modules.systemctl.gqlModel.GQLApis;

@Mapper(uses = {
        DictionaryMapper.class,
        LangMapper.class,
        ModuleMapper.class
})
public interface ApisMapper {

    ApisMapper MAPPER = Mappers.getMapper(ApisMapper.class);


    @Mapping(source = "id" , target = "id")
    @Mapping(source = "code" , target = "code")
    @Mapping(target = "module" , ignore = true)
    GQLApis toApis(Apis entity);

    @InheritConfiguration(name = "toApis")
    List<GQLApis> toApisList(List<Apis> entities);
}
